<%@page import="model.classes.Fabricante"%>
<%@page import="java.util.List"%>
<%@page import="model.classesDAO.FabricanteDAO"%>
<%@page import="model.fabrica.Fabrica"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Fabricantes</title>
</head>
<body>
<table border='1'>
				<thead>
					<tr>
						<th>A/R</th>
						<th>Nome</th>
						<th>Fundador</th>
						<th></th>
					</tr>
				</thead>
				<tbody>
				<% 	
					FabricanteDAO FD = Fabrica.getFabricanteDAO();
                    List<Fabricante> fabricantes = FD.pesquisarTodos();
                    for(Fabricante fabricante : fabricantes)
					{
						out.print("<tr><td><a href=AlterarFabricante.jsp?id=" + fabricante.getId() + " >Alterar</a> / <a href=RemoverFabricante?id=" + fabricante.getId() + " >Remover</a></td><td>"+ fabricante.getNome() + "</td><td>" + fabricante.getFundador() + "</td></tr>");
					}
				%>
				</tbody>
				</table>
<a href="CadastrarFabricante.jsp">Cadastrar Fabricante</a>
</body>
</html>